import request from '../request.js';
import car from '../mock/car';
import Mock from 'mockjs';
import { createPromise } from '../util';

const { mobileUrl, baseApi } = window.g;

/** 车端信息 */
export const vehicleInfo = (data) => {
  return createPromise(Mock.mock(car['vehicleInfo']));
}

/** 车速监控 */
export const speed = (data) => {
  return createPromise(Mock.mock(car['speed']));
}

/** 车辆行为画像 */
export const behavior = (data) => {
  return createPromise(Mock.mock(car['behavior']));
}

/** 车辆轨迹 */
export const getCarTrack = (params) => request({
  url: `${baseApi}/vehiclemap/findByVin`,
  method: 'POST',
  data: params
});
